(function () {
    var core = ecui,
        dom = ecui.dom;

    ecui.esr.addRoute('initiate', {
        model: [''],
        weight: 3,
        // queryUrl: '@FORM /erp-management/customer/musician/select-list-page?initiateListSearchForm',
        queryUrl: '@FORM /erp-management/data/approval-center?mineinitiateFilterListForm&type=3&saveHistory=1',
        queryUrl1: '@FORM /erp-management/data/approval-center?mineinitiateFilterListForm&mineinitiateSearchListForm&type=3&saveHistory=1',
        //{if 1}////{/if}//queryUrl: '@FORM /erp-management/data/approval-center?mineinitiateFilterListForm&type=3&saveHistory=1',
        //{if 1}////{/if}//queryUrl1: '@FORM /erp-management/data/approval-center?mineinitiateFilterListForm&mineinitiateSearchListForm&type=3&saveHistory=1',
        // children: 'music_people_list',
        main: 'approval_initiate-initiate',
        view: 'initiate.initiateList',
        frame: true,
        children: ['initiate.historyList'],
        onbeforerender: function (context) {

        },
        onafterrender: function (context) {
            var initiateListView = ecui.get('mine-initiate-list-view');
            var initiateSearchListView = ecui.get('mine-initiate-search-list-view');

            initiateSearchListView.setUrlName('queryUrl1');

            ecui.dispatchEvent(initiateListView, 'refresh');
        }
    });
    // 已审批的搜索历史
    core.esr.addRoute('historyList', {
        model: [
            'historys@GET /erp-management/search/history/list'
        ],
        main: 'order_initiate_history_container',
        view: 'history_list',
        frame: true,
        weight: 3,
        onbeforerender: function (context) {
            // console.log(context);
        },
        onafterrender: function () {
        },
        oncached: function () {
        }
    });
}());